import React, { memo } from "react";
import MyTarbar from "../component/MyTarbar";
import { Outlet, useMatches ,Link} from "react-router-dom";
import MyNavbar from "../component/MyNavbar";
const About = memo(() => {
  let match = useMatches();
  let str = match
    .filter((item) => item.handle)
    .map((item) => item.handle.title)
    .join(">");
  return (
    <div>
      <div>
         <MyNavbar></MyNavbar>
      </div>
      {str}
      <br />
      <Link to={'/about/one'}>搜索</Link>
      <Link to={'/about/one/two'}>推荐</Link>
      <Outlet></Outlet>
      <div>
        <MyTarbar></MyTarbar>
      </div>
    </div>
  );
});

export default About;
